package japidviews.Application;
import java.util.*;
import java.io.*;
import cn.bran.japid.tags.Each;
import static play.templates.JavaExtensions.*;
import static cn.bran.play.JapidPlayAdapter.*;
import static play.data.validation.Validation.*;
import japidviews._layouts.*;
import play.i18n.Messages;
import play.data.validation.Validation;
import play.mvc.Scope.*;
import models.*;
import play.data.validation.Error;
import play.i18n.Lang;
import japidviews._tags.*;
import play.mvc.Http.*;
import controllers.*;
import japidviews._javatags.*;
//
// NOTE: This file was generated from: japidviews/Application/addRecipeForm.html
// Change to this file will be lost next time the template file is compiled.
//
@cn.bran.play.NoEnhance
public class addRecipeForm extends main
{
	public static final String sourceTemplate = "japidviews/Application/addRecipeForm.html";
	{
		putHeader("Content-Type", "text/html; charset=utf-8");
		setContentType("text/html; charset=utf-8");
	}

// - add implicit fields with Play

	final Request request = Request.current(); 
	final Response response = Response.current(); 
	final Session session = Session.current();
	final RenderArgs renderArgs = RenderArgs.current();
	final Params params = Params.current();
	final Validation validation = Validation.current();
	final cn.bran.play.FieldErrors errors = new cn.bran.play.FieldErrors(validation);
	final play.Play _play = new play.Play(); 

// - end of implicit fields with Play 


	public addRecipeForm() {
		super(null);
	}
	public addRecipeForm(StringBuilder out) {
		super(out);
	}
/* based on https://github.com/branaway/Japid/issues/12
 */
	public static final String[] argNames = new String[] {/* args of the template*/ };
	public static final String[] argTypes = new String[] {/* arg types of the template*/ };
	public static final Object[] argDefaults= new Object[] { };
	public static java.lang.reflect.Method renderMethod = getRenderMethod(japidviews.Application.addRecipeForm.class);

	{
		setRenderMethod(renderMethod);
		setArgNames(argNames);
		setArgTypes(argTypes);
		setArgDefaults(argDefaults);
		setSourceTemplate(sourceTemplate);
	}
////// end of named args stuff

	public cn.bran.japid.template.RenderResult render() {
		long t = -1;
		try {super.layout("Добавить рецепт","Добавить рецепт",null);} catch (RuntimeException e) { super.handleException(e);} 
		return new cn.bran.japid.template.RenderResultPartial(getHeaders(), getOut(), t, actionRunners, sourceTemplate);
	}
	@Override protected void doLayout() {
		beginDoLayout(sourceTemplate);
//------
;// line 1
		p("\n" + 
"<ul class=\"breadcrumb\">\n" + 
"    <li>\n" + 
"		<a href=\"");// line 1
		p(lookup("Application.index", new Object[]{}));// line 5
		p("\">Главная</a> <span class=\"divider\">/</span>\n" + 
"    </li>\n" + 
"    <li class=\"active\">Предложить рецепт</li>\n" + 
"</ul>\n" + 
"<form action=\"");// line 5
		p(lookup("Application.addRecipe", new Object[]{}));// line 9
		p("\" method=\"post\" accept-charset=\"utf-8\" enctype=\"application/x-www-form-urlencoded\" class=\"form-horizontal\">\n" + 
"	");// line 9
		p(authenticityToken());// line 10
		p("\n" + 
"	<fieldset>\n" + 
"		<legend>Предложить свой рецепт</legend>\n" + 
"		<div class=\"clearfix\">\n" + 
"			<label for=\"name\">Название рецепта:</label>\n" + 
"			<div class=\"input\">\n" + 
"				<input type=\"text\" name=\"name\" value=\"");// line 10
		p(flash("name"));// line 16
		p("\"/>\n" + 
"				<span class=\"help-inline\"></span>\n" + 
"				");// line 16
		if(hasError("name")){// line 18
		p("<span class=\"alert-message error\">");// line 18
		p(error("name"));// line 18
		p("</span>");// line 18
		}// line 18
		p("\n" + 
"				<span class=\"help-block\">Обязательное</span>\n" + 
"			</div>\n" + 
"		</div>\n" + 
"		<div class=\"clearfix\">\n" + 
"			<label for=\"description\">Описание рецепта:</label>\n" + 
"			<div class=\"input\">\n" + 
"				<textarea rows=\"10\" cols=\"20\" name=\"description\">");// line 18
		p(flash("description"));// line 25
		p("</textarea>\n" + 
"				<span class=\"help-inline\"></span>\n" + 
"				");// line 25
		if (hasError("description")){// line 27
		p("<span class=\"alert-message error\">");// line 27
		p(error("description"));// line 27
		p("</span>");// line 27
		}// line 27
		p("\n" + 
"				<span class=\"help-block\">Обязательное</span>\n" + 
"			</div>\n" + 
"		</div>\n" + 
"		<div class=\"clearfix\">\n" + 
"			<label for=\"name\">Ваше имя:</label>\n" + 
"			<div class=\"input\">\n" + 
"				<input type=\"text\" name=\"author\" value=\"");// line 27
		p(flash("author"));// line 34
		p("\"/>\n" + 
"				<span class=\"help-inline\"></span>\n" + 
"				");// line 34
		if (hasError("author")){// line 36
		p("<span class=\"alert-message error\">");// line 36
		p(error("author"));// line 36
		p("</span>");// line 36
		}// line 36
		p("\n" + 
"				<span class=\"help-block\">Обязательное</span>\n" + 
"			</div>\n" + 
"		</div>\n" + 
"	</fieldset>\n" + 
"	<div class=\"actions\">\n" + 
"		<input type=\"submit\" class=\"btn primary\" value=\"Добавить рецепт\"/>\n" + 
"	</div>\n" + 
"</form>");// line 36
		
		endDoLayout(sourceTemplate);
	}

}